package com.proba.annotations.hibernate;

import java.util.List;

import org.hibernate.criterion.Restrictions;

import com.proba.annotations.PotrosenMaterijalDAO;
import com.proba.annotations.pojo.PotrosenMaterijal;

/**
 * <p>Hibernate DAO layer for PotrosenMaterijals</p>
 * <p>Generated at Mon May 10 22:57:47 CEST 2010</p>
 *
 * @author Salto-db Generator v1.0.16 / EJB3 + Hibernate DAO
 * @see http://www.hibernate.org/328.html
 */
public class PotrosenMaterijalHibernateDAO extends
		AbstractHibernateDAO<PotrosenMaterijal, Long> implements
		PotrosenMaterijalDAO {

	/**
	 * Find PotrosenMaterijal by potrosenMaterijal
	 */
	public List<PotrosenMaterijal> findByPotrosenMaterijal(String potrosenMaterijal) {
		return findByCriteria(Restrictions.eq("potrosenMaterijal", potrosenMaterijal));
	}
	
	/**
	 * Find PotrosenMaterijal by tipPotrosenMaterijal
	 */
	public List<PotrosenMaterijal> findByTipPotrosenMaterijal(Long tipPotrosenMaterijal) {
		return findByCriteria(Restrictions.eq("tipPotrosenMaterijal.tipPotrosenMaterijal", tipPotrosenMaterijal));
	}
	
	/**
	 * Find PotrosenMaterijal by edinicaMerka
	 */
	public List<PotrosenMaterijal> findByEdinicaMerka(Long edinicaMerka) {
		return findByCriteria(Restrictions.eq("edinicaMerka.edinicaMerka", edinicaMerka));
	}
	

}
